<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品规格管理">
</@frame.head>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> 课程管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">


    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
    <span class="l">
    <a href="javascript:;" onclick="addrole();" type="button" class="btn btn-primary radius"> 添加课程</a>
    </span>
    <span class="r">共有数据：<strong>${pagination.totalCount}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr  class="text-c">
            <th >ID</th>
            <th >封面</th>
            <th >课程标题</th>
            <th >课程简介</th>
            <th >讲师</th>
            <th >创建时间</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody >
         <#list pagination.list as list>
         <tr  class="text-c">
            <td>${list.id}</td>
            <td>${list.imge}</td>
            <td>${list.coursetitle}</td>
             <td>${list.courseintroduction}</td>
            <td>${list.teacher}</td>
            <td>${(list.releasetime?string("yyyy-MM-dd"))!}</td>
            <td>
            <a href="${contextPath}/courses/View_to?id=${list.id}" type="button" >查看</a>&nbsp;&nbsp;&nbsp;
            <a href="${contextPath}/courses/modify_to?id=${list.id}" type="button">修改</a>&nbsp;&nbsp;&nbsp;
            <a href="javascript:;" type="button" onclick="delrole(${list.id?c});">删除</a>&nbsp;&nbsp;&nbsp;
            </td>
         </tr>
         </#list>
        </tbody>
    </table>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/system/courses.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
	cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
    last: ${pagination.totalPage},
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
        	window.location.href = path + "/courses/coursespage?page=" + obj.curr
        }
    }
})  

</script>